import React, { Component } from 'react'

export default class App extends Component {
    state = {
        list:[{id:1,text:'1'},{id:2,text:'2'},{id:3,text:'3'}]
    }
  render() {
    return (
      <div>
          <ul>
              {
                  this.state.list.map((item,index)=><li key={item.id}>索引:{index}---值:{item.text}</li>)
              }
          </ul>
      </div>
    )
  }
}
